import request from '@/utils/request.js'

// 热搜词
export const hotSearch = () => request('/search/hot')

// 搜索
export const search = (keywords = '', limit = 30, offset = 0, type = '') => request(`/cloudsearch?keywords=${keywords}&limit=${limit}&offset=${offset}&type=${type}`)
export const searchSim = ({ keywords = '', limit = 30, offset = 0, type = '' }) => request(`/search?keywords=${keywords}&limit=${limit}&offset=${offset}&type=${type}`)

// 搜索建议
export const suggest = (keywords = '') => request(`/search/suggest?keywords=${keywords}`)

// 推荐新音乐
export const newsong = (limit = 6) => request(`/personalized/newsong?limit=${limit}`)

// 获取专辑内容
export const albumDetail = id => request(`/album?id=${id}`)

// 专辑动态信息
export const albumDetailDynamic = id => request(`/album/detail/dynamic?id=${id}`)
